#ifndef OTHELLO_CUT_H
#define OTHELLO_CUT_H

#include <iostream>

#define MAX(s,t)      ((s)>(t)?(s):(t))
#define MIN(s,t)      ((s)<(t)?(s):(t))
#define MAXVALUE      1000
#define DIM           36
#define N             6

using namespace std;

class state_t {
protected:
    unsigned char t_;
    unsigned free_;
    unsigned pos_;
public:

    explicit state_t(unsigned char t = 6); //explicit lo usa para forzar al compilador a que no cree una conversion implicita en el constructor :) F
    //getters F

    unsigned char t() const;

    unsigned free() const;

    unsigned pos() const;
    // F

    bool is_color(bool color, int pos) const;

    bool is_black(int pos) const;

    bool is_white(int pos) const;

    bool is_free(int pos) const;

    bool is_full() const;

    unsigned value() const;

    bool terminal() const;

    bool outflank(bool color, int pos) const; // creo que esta funcion lo que hace es decir si la posicion se "desborda" o no F	

    bool is_black_move(int pos) const;

    bool is_white_move(int pos) const;

    void set_color(bool color, int pos);

    state_t move(bool color, int pos) const;

    state_t black_move(int pos);

    state_t white_move(int pos);

    bool operator<(const state_t &s) const;

    bool operator==(const state_t &s) const {
        return (free_ == s.free() && pos_ == s.pos() && t_ == s.t());
    }


    void print(ostream &os, int depth) const;
    void print_bits(ostream &os) const;
};

#endif





